#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018-12-05 16:47
# @Author  : 少爷

def fact(j):
    sum = 0
    if j == 0:
        sum = 1
    else:
        sum = j * fact(j - 1)
    return sum

for i in range(10):
    print '%d! = %d' % (i, fact(i))
